package ustc.xiaoyang.karl.string;

import java.util.Scanner;

/**
 * 卡玛网 55.右旋字符串
 */
public class RightHandedString {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int k = scanner.nextInt();
        String str = scanner.next();
        System.out.println(rightHandedString(str,k));
    }
    public static String rightHandedString(String str, int k){
        StringBuilder sb = new StringBuilder();
        sb.append(str.substring(str.length()-k));
        sb.append(str.substring(0,str.length()-k));
        return sb.toString();
    }
}
